import request from '@/utils/request'

// 查询新闻动态列表
export function listStudynews(query) {
  return request({
    url: '/studytourism/studynews/list',
    method: 'get',
    params: query
  })
}

// 查询新闻动态详细
export function getStudynews(newsId) {
  return request({
    url: '/studytourism/studynews/' + newsId,
    method: 'get'
  })
}

// 新增新闻动态
export function addStudynews(data) {
  return request({
    url: '/studytourism/studynews',
    method: 'post',
    data: data
  })
}

// 修改新闻动态
export function updateStudynews(data) {
  return request({
    url: '/studytourism/studynews',
    method: 'put',
    data: data
  })
}

// 删除新闻动态
export function delStudynews(newsId) {
  return request({
    url: '/studytourism/studynews/' + newsId,
    method: 'delete'
  })
}
